import request from '@/utils/request.js'

// 封装一个我的频道
export const channels = () => {
  return request({
    url: '/v1_0/user/channels'
  })
}

// 封装一个所有频道的接口
export const channelsAll = () => {
  return request({
    url: '/v1_0/channels'
  })
}

// 封装一个添加我的频道的接口
export const addChannel = (data) => {
  return request({
    url: '/v1_0/user/channels',
    method: 'PATCH',
    data
  })
}

// 封装一个删除我的频道的接口
export const delChannel = (id) => {
  return request({
    url: '/v1_0/user/channels/' + id,
    method: 'DELETE'
  })
}
